﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.CMS263.BLL;
using Com.CMS263.PO;
using Com.CMS263.Util;

namespace Com.CMS263.Web.manage.BaoInfoManage
{
    public partial class bao_list : System.Web.UI.Page
    {


        public IList<BaoInfo> prodlist = new List<BaoInfo>();
        BaoInfoBLL pbll = new BaoInfoBLL();
        
        public int page = 0;
        public int pagecount = 0;
        public int pagesize = 10;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                page = Convert.ToInt32(Request["page"]);
                if (page == 0)
                {
                    page = 1;
                }
                prodlist = pbll.GetListByPager(page, pagesize,0);
            }
        }
        

        
        public string GetPager()
        {
            pagecount = pbll.GetListByPager(0);
            return EnPager.GetPager(pagecount, pagesize, page, "");
        }
        VoteOptionBLL vobll = new VoteOptionBLL();
        public int GetVoteOptionCount(int vtid)
        {
            return vobll.GetListByPager(vtid);
        }
    }
}
